//
//  GRMyRiceCommonHeader.m
//  YC_GRice
//
//  Created by LiuFeng on 2018/7/26.
//  Copyright © 2018年 YeCai. All rights reserved.
//

#import "GRMyRiceCommonHeader.h"

@implementation GRMyRiceCommonHeader

- (void)configureRice:(BOOL)isRice {
    if (isRice) {
        _linesCenter.hidden  = YES;
        self.isLinesHidden   = YES;
    }else {
        _currentTextLabel.text = @"可用额度";
        _riceDescript.text     = @"前往安全认证，开通额度";
    }
    
    if (KscreenWidth == 320) {
        _bottomLayout.constant = 20;
    }
    CGFloat height = (KscreenWidth-16)*189.0/359;
    IS_IPHONEX ? height : (height += 20);
    self.frame = CGRectMake(0, 0, KscreenWidth, height);
}

-(void)setIsLinesHidden:(BOOL)isLinesHidden {
    _arrowIMG.hidden     = isLinesHidden;
    _linesBtn.hidden     = isLinesHidden;
    _riceDescript.hidden = isLinesHidden;
}

- (IBAction)didClickDespButton:(UIButton *)sender {
    if ([self.delegate respondsToSelector:@selector(goToCertificationCenter)]) {
        [self.delegate goToCertificationCenter];
    }
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
